﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Admin_Master.Master" CodeBehind="ThemSanPham.aspx.cs" Inherits="Layout_website.Admin_panel.ThemSanPham" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>


<asp:Content ContentPlaceHolderID="content_admin" ID="dsa" runat="server">
    
    <div class="col-md-12">
        <!-- BOX -->
        <div class="box border">
            <div class="box-title">
                <h4><i class="fa fa-user"></i><span class="hidden-inline-mobile">ĐĂNG SẢN PHẨM MỚI</span></h4>
            </div>
            <div class="box-body">
                <div class="tabbable header-tabs user-profile">
                    <ul class="nav nav-tabs">
                        <li><a href="#pro_help" data-toggle="tab"><i class="fa fa-question"></i><span class="hidden-inline-mobile">Danh sách loại sản phẩm</span></a></li>
                        <li class="active"><a href="#pro_edit" data-toggle="tab"><i class="fa fa-edit"></i><span class="hidden-inline-mobile">Thêm sản phẩm mới</span></a></li>

                    </ul>
                </div>
                <div class="tab-content">

                    <!-- EDIT ACCOUNT -->
                    <div class="tab-pane fade active in" id="pro_edit">
                        <form class="form-horizontal" action="#">
                            <div class="row">
                               


                                <div class="col-md-6">
                                    <div class="box">
                                        <div class="box-body big">
                                            <div class="row">
                                                <div class="col-md-12">


                                                  
                                                    <h4>Thông tin chung của sản phẩm</h4>
                                                    <div class="separator"></div>
                                                   
											        
								                     <div class="form-group">
											 <label class="col-md-4 control-label">Chọn SP từ danh mục </label> 
											 <div class="col-md-8"> 
												 <label class="radio-inline"> <div class="radio" style="margin-left: 3px !important;"><span><input type="radio" class="uniform" name="optionsRadios2" value="option1"></span></div> Có</label> 
												 <label class="radio-inline"> <div class="radio"  style="margin-left: 3px !important;"><span class="checked"><input type="radio" class="uniform" name="optionsRadios2" value="option2" checked=""></span></div> không </label>
												 
											 </div>






										  </div>
                                                    
                                                         <asp:Panel ID="Panel1"  runat="server">
                                                              <div class="form-group">
                                                        <label class="col-sm-4 control-label">Danh mục</label>
                                                        <div class="col-sm-8">
                                                            <asp:DropDownList class="form-control input-sm" ID="DropDownList5" runat="server"></asp:DropDownList>
                                                        </div>
                                                    </div>
                                                              <div class="form-group">
                                                        <label class="col-sm-4 control-label"></label>
                                                        <div class="col-sm-8">
                                                            <asp:DropDownList class="form-control input-sm" ID="DropDownList6" runat="server"></asp:DropDownList>
                                                        </div>
                                                    </div>
                                                         </asp:Panel>
                                                    <div class="form-group">
                                                        <label class="col-md-4 control-label">Mã sản phẩm </label>
                                                        <div class="col-md-8">
                                                            <asp:TextBox placeholder="Mã sản phẩm tự động tạo" ReadOnly="true" ID="txtMaSanPham" class="form-control input-sm " runat="server"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                    <div class="form-group">
                                                        <label class="col-md-4 control-label">Tên sản phẩm <span class="required">*</span>:</label>
                                                        <div class="col-md-8">

                                                            <asp:TextBox placeholder="Nhập tên của sản phẩm" ID="txtTenSanPham" class="form-control input-sm" runat="server"></asp:TextBox>

                                                        </div>
                                                    </div>
                                                    <div class="form-group">
                                                        <label class="col-sm-4 control-label">Giá gốc</label>
                                                        <div class="col-sm-8">
                                                             <asp:TextBox placeholder="Giá xuất kho của sản phẩm" ID="TextBox1" class="form-control input-sm" runat="server"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                     <div class="form-group">
                                                        <label class="col-sm-4 control-label">Thuế VAT</label>
                                                        <div class="col-sm-8">
                                                            <asp:DropDownList class="form-control input-sm" ID="DropDownList2" runat="server"></asp:DropDownList>
                                                        </div>
                                                    </div>
                                                    <div class="form-group">
                                                        <label class="col-sm-4 control-label">Giá bán lẻ</label>
                                                        <div class="col-sm-8">
                                                             <asp:TextBox placeholder="Giá bán lẻ" ID="TextBox2" class="form-control input-sm" runat="server"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                    <div class="form-group">
                                                        <label class="col-md-4 control-label">Ghi chú</label>
                                                        <div class="col-md-8">
                                                            <asp:TextBox placeholder="Ghi chú" ID="txtGhiChu" class="form-control input-sm" runat="server" TextMode="MultiLine"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                   



                                                   


                                                </div>

                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="col-md-6">
                                    <div class="box">
                                        <div class="box-body big">
                                            <div class="row">
                                                <div class="col-md-12">
                                                    <h4>Thông tin khuyến mãi-ưu đãi</h4>
                                                    <div class="separator"></div>
                                                      <div class="form-group">
											 <label class="col-md-4 control-label">Sản phẩm đang khuyến mãi </label> 
											 <div class="col-md-8"> 
												 <label class="radio-inline"> <div class="radio" style="margin-left: 3px !important;"><span><input type="radio" class="uniform" name="optionsRadios2" value="option1"></span></div> Có</label> 
												 <label class="radio-inline"> <div class="radio"  style="margin-left: 3px !important;"><span class="checked"><input type="radio" class="uniform" name="optionsRadios2" value="option2" checked=""></span></div> không </label>
												 
											 </div>






										  </div>
                                                    
                                                    <asp:Panel ID="Panel2" runat="server">


                                                        <div class="form-group">
                                                            <label class="col-sm-4 control-label">Giá khuyến mãi</label>
                                                            <div class="col-sm-8">
                                                                <asp:TextBox placeholder="Giá bán lẻ" ID="TextBox5" class="form-control input-sm" runat="server"></asp:TextBox>
                                                            </div>
                                                            </div>
                                                            <div class="form-group">
                                                                <label class="col-sm-4 control-label">Quà tặng kèm theo</label>
                                                                <div class="col-sm-8">
                                                                    <asp:TextBox placeholder="Giá bán lẻ" ID="TextBox8" class="form-control input-sm" runat="server"></asp:TextBox>
                                                                </div>
                                                            </div>
                                                       
                                                        <div class="form-group">
                                                        <label class="col-sm-4 control-label">Ngày bắt đầu </label>
                                                        <div class="col-sm-8">
                                                           <asp:TextBox placeholder="Giá bán lẻ" ID="TextBox9" class="form-control input-sm" runat="server"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                        <div class="form-group">
                                                        <label class="col-sm-4 control-label">Ngày kết thúc</label>
                                                        <div class="col-sm-8">
                                                            <asp:TextBox placeholder="Giá bán lẻ" ID="TextBox10" class="form-control input-sm" runat="server"></asp:TextBox>
                                                        </div>
                                                    </div>
                                                         <div class="form-group">
                                                        <label class="col-md-4 control-label">Ghi chú</label>
                                                        <div class="col-md-8">
                                                            <textarea name="regular"  placeholder="VD:Sản phẩm áp dụng tại TPHCM" class="form-control"></textarea>
                                                        </div>
                                                    </div>

                                                    </asp:Panel>
                                                 
                                                   

                                                  

                                                    <br />

                                           



                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>


                                  <div class="col-md-12">
                                    <div class="box">
                                        <div class="box-body big">
                                            <div class="row">
                                                <div class="col-md-12">
                                                
                                                    
                                                      <h4>Thông tin chi tiết của sản phẩm</h4>
                                                    <div class="separator"></div>
                                                        <div class="form-group">
                                                        <label class="col-md-2 control-label"><b>Giới thiệu sản phẩm</b></label><br />
                                                        <div class="col-md-12">
                                                            <FCKeditorV2:FCKeditor ID="fckGioiThieu" runat="server" Height="400px" ToolbarSet="Simple"></FCKeditorV2:FCKeditor>
                                                        </div>
                                                    </div>
                                                      <div class="separator"></div>

                                                    <div class="form-group">
                                                        <label class="col-md-2 control-label">Tạo mẫu nhập mới:</label>
                                                        <div class="col-md-10">
                                                            <div class="input-group">
                                                                <input type="text" class="form-control"><span class="input-group-btn">

                                                                    <asp:LinkButton class="btn btn-success" ID="LinkButton2" runat="server"><i class="fa fa-plus-square"></i> Add new</asp:LinkButton>

                                                                </span>
                                                            </div>
                                                            <span class="help-block">Tips: Nhập tên và nhấp "Add new" để tạo mẫu nhập liệu mới</span>
                                                        </div>
                                                    </div>
                                                    <div class="form-group">
                                                        <label class="col-sm-2 control-label">Chọn mẫu nhập liệu:</label>

                                                        <div class="col-sm-10">
                                                            <asp:DropDownList class="form-control input-sm" ID="DropDownList3" runat="server"></asp:DropDownList><br />
                                                            <a href="#">Mẫu nhập liệu là gì?</a>
                                                        </div>



                                                    </div>
                                                    <div class="form-group">
                                                        <label class="col-md-2 control-label"><b>Tính năng sản phẩm</b></label>
                                                        <div class="col-md-12">
                                                            <FCKeditorV2:FCKeditor ID="fckCauHinhSanPham" runat="server" Height="400px" ToolbarSet="Basic" ></FCKeditorV2:FCKeditor>
                                                        </div>
                                                    </div>
                                                    

                                                    <br />

                                                     <style>
        .ajax__fileupload_button
        {
            background-color: green;
        }
    </style>
    <script type="text/javascript">


        function onClientUploadComplete(sender, e) {
            onImageValidated("TRUE", e);
        }

        function onImageValidated(arg, context) {

            var test = document.getElementById("testuploaded");
            test.style.display = 'block';

            var fileList = document.getElementById("fileList");
            var item = document.createElement('div');
            item.style.padding = '4px';

            if (arg == "TRUE") {
                var url = context.get_postedUrl();
                url = url.replace('&amp;', '&');
                item.appendChild(createThumbnail(context, url));
            } else {
                item.appendChild(createFileInfo(context));
            }

            fileList.appendChild(item);
        }

        function createFileInfo(e) {
            var holder = document.createElement('div');
            holder.appendChild(document.createTextNode(e.get_fileName() + ' with size ' + e.get_fileSize() + ' bytes'));

            return holder;
        }

        function createThumbnail(e, url) {
            var holder = document.createElement('div');
            var img = document.createElement("img");
            img.style.width = '80px';
            img.style.height = '80px';
            img.setAttribute("src", url);

            holder.appendChild(createFileInfo(e));
            holder.appendChild(img);

            return holder;
        }

        function onClientUploadStart(sender, e) {
            document.getElementById('uploadCompleteInfo').innerHTML = 'Please wait while uploading ' + e.get_filesInQueue() + ' files...';
        }
        function onClientUploadCompleteAll(sender, e) {
            var args = JSON.parse(e.get_serverArguments()),
                unit = args.duration > 60 ? 'minutes' : 'seconds',
                duration = (args.duration / (args.duration > 60 ? 60 : 1)).toFixed(2);

            var info = 'At <b>' + args.time + '</b> server time <b>'
                + e.get_filesUploaded() + '</b> of <b>' + e.get_filesInQueue()
                + '</b> files were uploaded with status code <b>"' + e.get_reason()
                + '"</b> in <b>' + duration + ' ' + unit + '</b>';
            document.getElementById('uploadCompleteInfo').innerHTML = info;
        }

    </script>
                                                     <h4>Hình ảnh sản phẩm</h4>
                                                  <div class="separator"></div>









								<!-- BOX-->
								<div class="box border green">
									<div class="box-title">
										<h4><i class="fa fa-desktop"></i>Khung upload hình ảnh</h4>
										
									</div>
									<div class="box-body">
										<div class="row">
											<div class="col-md-12">
												<div class="text-center">
													<%--<div class="btn-group">
														<a class="btn btn-default basic-alert" href="#">Tải lên hình ảnh của sản phẩm</a>
														<a class="btn btn-default confirm-dialog" href="#">Confirm Alert</a>
														<a class="btn btn-default multiple-dialogs" href="#">Multiple Alerts</a>
														<a class="btn btn-default multiple-buttons" href="#">Multiple Buttons</a>													
														<a class="btn btn-default programmatic-close" href="#">Force Close</a>
													</div>--%>
												</div>
 

                                         <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
                                                    <div class="demoarea">
        <div class="demoheading"></div>
        Nhấp chuột vào <i>"Select file"</i> để chọn nội dung tải lên hoặc kéo thả nội dung vào khung <i>"Drop file"</i> phía dưới. Bạn có thể tải lên cùng lúc 15 hình ( Với các định dạng sau: .jpg/.jpeg/.png/.gif )
        <br />
                                                        <br />
        <asp:Label runat="server" ID="myThrobber" Style="display: none;"><img align="absmiddle" alt="" src="uploading.gif"/></asp:Label>


        <asp:AjaxFileUpload ID="AjaxFileUpload1" runat="server" Padding-Bottom="4" 
                                                            Padding-Left="2" Padding-Right="1" Padding-Top="4" ThrobberID="myThrobber" OnClientUploadComplete="onClientUploadComplete"
                                                            OnUploadComplete="AjaxFileUpload1_OnUploadComplete" MaximumNumberOfFiles="15"
                                                            AllowedFileTypes="jpg,jpeg,png,gif" OnClientUploadCompleteAll="onClientUploadCompleteAll" OnUploadCompleteAll="AjaxFileUpload1_UploadCompleteAll" OnUploadStart="AjaxFileUpload1_UploadStart" OnClientUploadStart="onClientUploadStart" />
        
        <div id="uploadCompleteInfo"></div>
        <br />
        <div id="testuploaded" style="display: none; padding: 4px; border: gray 1px solid;">
            <h4>
                list of uploaded files:</h4>
            <hr />
            <div id="fileList">
            </div>
        </div>
                                                        <br />
        <asp:Button ID="btnSubmit" CssClass="btn btn-success pull-right tut" runat="server" Text="Lưu hình" />
    </div>



												
												<%--<div class="well example-modal">
													<div class="modal">
													  <div class="modal-dialog">
														<div class="modal-content">
														  <div class="modal-header">
															<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
															<h4 class="modal-title">Modal title</h4>
														  </div>
														  <div class="modal-body">
															<p>One fine body…</p>
														  </div>
														  <div class="modal-footer">
															<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
															<button type="button" class="btn btn-primary">Save changes</button>
														  </div>
														</div><!-- /.modal-content -->
													  </div><!-- /.modal-dialog -->
													</div><!-- /.modal -->
												</div>--%>
											</div>
										</div>
									</div>
								</div>
								<!-- /BOX -->
						
                                                    <div class="separator"></div>
                                                    
                                                    
                                                </div>

                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>
                        <div class="form-actions clearfix">

                            <asp:LinkButton ID="LinkButton4" class="btn btn-danger pull-right tut" runat="server"><i class="fa fa-trash-o "></i> Hủy bỏ</asp:LinkButton>
                            <asp:LinkButton ID="LinkButton3" class="btn btn-primary pull-right tut" runat="server"><i class="fa fa-save "></i> Lưu kho</asp:LinkButton>
                        </div>

                    </div>
                    <!-- /EDIT ACCOUNT -->

                    <!-- HELP -->
                    <div class="tab-pane fade" id="pro_help">
                        <form class="form-horizontal" action="#">
                            <div class="row">
                                <div class="col-md-12">
                                    <!-- BOX -->
                                    <div class="box ">
                                        <!-- TOP ROW -->
                                        <div class="emailHeader row">
                                            <!--searchbox-->
                                            <div class="emailTitle">
                                                <div class="col-md-2">
                                                </div>
                                                <div class="col-md-8">
                                                    <form class="form-inline hidden-xs" action="index.html">
                                                        <div class="input-group input-medium">
                                                            <input type="text" class="form-control" placeholder="Nhập mã phiếu hoặc ngày tháng để tìm kiếm">
                                                            <span class="input-group-btn">
                                                                <asp:LinkButton ID="LinkButton1" runat="server" class="btn btn-success"><i class="fa fa-search"></i></asp:LinkButton>
                                                            </span>
                                                        </div>
                                                    </form>
                                                </div>
                                            </div>

                                            <!--searchbox-->

                                        </div>
                                        <br />
                                        <div class="col-md-12">
                                            <!-- BOX -->
                                            <div class="box border primary">
                                                <div class="box-title">
                                                    <h4><i class="fa fa-table"></i>Danh sách phiếu nhập kho</h4>
                                                    <div class="tools hidden-xs">
                                                        <a href="#box-config" data-toggle="modal" class="config">
                                                            <i class="fa fa-cog"></i>
                                                        </a>
                                                        <a href="javascript:;" class="reload">
                                                            <i class="fa fa-refresh"></i>
                                                        </a>
                                                        <a href="javascript:;" class="collapse">
                                                            <i class="fa fa-chevron-up"></i>
                                                        </a>
                                                        <a href="javascript:;" class="remove">
                                                            <i class="fa fa-times"></i>
                                                        </a>
                                                    </div>
                                                </div>
                                                <div class="box-body">
                                                </div>
                                            </div>
                                            <!-- /BOX -->
                                        </div>
                                        <br>
                                        <!-- /TOP ROW -->
                                        <div class="box-body">
                                            <div class="row">
                                            </div>
                                        </div>
                                    </div>
                                    <!-- /BOX -->
                                </div>
                            </div>
                        </form>
                        <div class="divide-40"></div>
                    </div>
                    <!-- /HELP -->

                </div>
            </div>
            <!-- /USER PROFILE -->
        </div>
    </div>


</asp:Content>